package ai.restosuite.infrastructure.operation.listen;

import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.Expression;
import org.camunda.bpm.engine.delegate.JavaDelegate;

import java.util.Map;

public class ExternalTaskListener implements JavaDelegate {

    private Expression externalTopic;
    @Override
    public void execute(DelegateExecution delegateExecution) throws Exception {
        //参数
        Map<String, Object> variables = delegateExecution.getVariables();
        //队列topic
        String topic = (String) externalTopic.getValue(delegateExecution);

        //发送消息通知:流程发起通知
        System.out.println("--------发送消息通知-------:"+topic);

    }
}
